﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using NHibernate;

using FluentNHibernate.Automapping;
using FluentNHibernate.Automapping.Alterations;

namespace Domain.Model.Mapping.Overrides
{
    public class ProgramMappingOverride : IAutoMappingOverride<Program>
    {
        public void Override(AutoMapping<Program> mapping)
        {
            mapping.HasMany<Project>(x => x.Projects)
                .Cascade.All()
                .Inverse()
                .Not.LazyLoad()
                .AsBag();
        }
    }
}